﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="YKienPhanHoi.ascx.cs" Inherits="YKienPhanHoi" %>
<center>
    <asp:Panel ID="pnGridDetail" runat="server" Width="100%">
        <span class="BigLabel2">DANH SÁCH Ý KIẾN KHÁCH HÀNG</span><br />
        <asp:DropDownList Width="165px" runat="server" ID="cboTrangThai" 
            AutoPostBack="True" onselectedindexchanged="cboTrangThai_SelectedIndexChanged">
            <asp:ListItem Text="- Tất cả các trạng thái -" Value="-1"></asp:ListItem>
            <asp:ListItem Text="0 - Vừa mới gửi" Value="0" Selected="True"></asp:ListItem>
            <asp:ListItem Text="1 - Đã duyệt" Value="1"></asp:ListItem>
            <asp:ListItem Text="2 - Không duyệt" Value="2"></asp:ListItem>
        </asp:DropDownList>
        <asp:LinkButton runat="server" ID="cmdRefresh" onclick="cmdRefresh_Click">Refresh</asp:LinkButton>
        <asp:DataGrid ID="detailGrid" runat="server" AllowPaging="false" AutoGenerateColumns="False"
            OnItemCommand="detailGrid_ItemCommand" OnItemDataBound="detailGrid_ItemDataBound"
            OnPageIndexChanged="detailGrid_PageIndexChanged" Width="100%" PageSize="5">
            <PagerStyle Mode="NumericPages" />
            <Columns>
                <asp:BoundColumn HeaderText="<span>ID</span>" DataField="id"></asp:BoundColumn>
                <asp:BoundColumn HeaderText="<span>Ngày</span>" DataField="date"></asp:BoundColumn>
                <asp:BoundColumn HeaderText="<span>email</span>" DataField="email"></asp:BoundColumn>
                <asp:BoundColumn HeaderText="<span>Họ tên</span>" DataField="fullName"></asp:BoundColumn>
                <asp:BoundColumn HeaderText="<span>Địa chỉ</span>" DataField="address"></asp:BoundColumn>
                <asp:BoundColumn HeaderText="<span>ĐT</span>" DataField="phone"></asp:BoundColumn>
               <asp:BoundColumn HeaderText="<span>IP</span>" DataField="IP"></asp:BoundColumn>
               <asp:BoundColumn HeaderText="<span>detail</span>" DataField="detail"></asp:BoundColumn>
                <asp:BoundColumn HeaderText="<span>status</span>" DataField="status" Visible="False"></asp:BoundColumn>
                <asp:TemplateColumn HeaderText="<span>Cho hiện</span>">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    <ItemTemplate>
                        <asp:ImageButton runat="server" ID="cmdStatus" CommandName="cmdStatus" ToolTip="Tình trạng hiển thị" />
                    </ItemTemplate>
                </asp:TemplateColumn>
                
                <asp:TemplateColumn>
                    <ItemTemplate>
                        <asp:Button CausesValidation="False" ID="cmdDelete" runat="server" Text="Xóa" Width="40"
                            CommandName="cmdDelete" OnClientClick="return confirm('Bạn có chắc muốn xóa ý kiến này?');">
                        </asp:Button>
                    </ItemTemplate>
                </asp:TemplateColumn>
            </Columns>
            <HeaderStyle CssClass="HeaderRow" Font-Bold="True" />
        </asp:DataGrid>
        <br />
        <asp:SqlDataSource ID="dsDetail" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
            ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"></asp:SqlDataSource>
    </asp:Panel>
</center>

